package com.kb.design.entity;

import com.baomidou.mybatisplus.annotation.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.kb.design.config.ListIntegerTypeHandler;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

/**
 * 项目表(DesignProject)实体类
 *
 * @author makejava
 * @since 2024-01-17 15:31:33
 */
@Data
@TableName("design_project")
public class DesignProject implements Serializable {
    private static final long serialVersionUID = 668765187503200583L;

    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 项目名称
     */
    private String projectName;
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 版本
     */
    private Integer version;

    private String status;
    /**
     * 项目编号
     */
    private String projectNumber;
    /**
     * 设计状态
     */
    private String designStatus;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    private String createBy;
    private String createByName;
    /**
     * 更新人
     */

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDate projectEndDate;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDate startDate;

    private String updateBy;
    private String customerCode;
    private String customerName;
    /**
     * 项目相关人
     */
    @TableField(typeHandler = ListIntegerTypeHandler.class)
    private List<Integer> relevantResponsiblePerson;
    /**
     * 待检查人
     */
    @TableField(typeHandler = ListIntegerTypeHandler.class)
    private List<Integer> checkPersonList;
    /**
     * 奖金相关人
     */
    @TableField(typeHandler = ListIntegerTypeHandler.class)
    private List<Integer> bonusPerson;

    /**
     * 封装相关人
     */
    @TableField(typeHandler = ListIntegerTypeHandler.class)
    private List<Integer> pageBonusPerson;

    /**
     * 设计相关人
     */
    @TableField(typeHandler = ListIntegerTypeHandler.class)
    private List<Integer> designBonusPerson;
    /**
     * valor相关人
     */
    @TableField(typeHandler = ListIntegerTypeHandler.class)
    private List<Integer> valorBonusPerson;
    /**
     * 类型
     * 0 已下单 有订单数据绑定
     * 1 未下单 没有订单数据绑定
     */
    private String projectType;
    private Integer completionRate;
    private String designSoftware;
    private String salesArea;
    private BigDecimal pinAmount;
    private String layers;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDate loadingPlateTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDate warehousingTime;

    /**
     * 封装负责人
     * 设计负责人
     * valor负责人
     */
    private String pageLeader;
    private String designLeader;
    private String valorLeader;
    /**
     * 设计完成的状态
     */
    private String projectStatusAuxiliary;
    private Integer pageDepartments;
    private Integer designDepartments;

    private String responsiblePersonId;
    private String responsiblePersonName;
    private String designRemark;
    private boolean lifeCycle = true;

    private Integer bonusType;
    private LocalDateTime completionTime;
    /**
     * 加工附件
     */
    private String processingDocument;
    private String engineeringUrl;
    /**
     * 备注/描述
     */
    private String described;
}

